package main


type Node struct {
	Next *Node
}

func IsHasCir(head *Node) bool {
	if head == nil {
		return false
	}
	s, f := head, head
	for s != nil && f != nil && f.Next != nil {
		s = s.Next
		f = f.Next.Next
		if s == f {
			return true
		}
	}
	return false
}
